package com.softWang.common.request;

import com.github.pagehelper.PageHelper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@ApiModel("分页条件")
public abstract class PageParams implements Serializable {
    @ApiModelProperty(value = "当前页码" ,required = true)
    @NotNull(message = "当前页码不为空")
	protected Integer currentPage;
    @ApiModelProperty(value = "页面大小" ,required = true)
    @NotNull(message = "页面大小不为空")
    protected Integer pageSize;


    public void startPage(){
        PageHelper.startPage(currentPage,pageSize);
    }


}